﻿Public Class MainMenu
    Public per As Int16
    Private Sub បនថមថមToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles បនថមថមToolStripMenuItem.Click
        Dim frm As New Employee
        'frm.WindowState = FormWindowState.Maximized
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub មលបញចមនរតToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles មលបញចមនរតToolStripMenuItem.Click
        Dim frm As New EmpList
        'frm.WindowState = FormWindowState.Maximized
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub អពខញToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles អពខញToolStripMenuItem.Click
        Dim frm As New About
        frm.ShowDialog()
    End Sub

    Private Sub អងគភពToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles អងគភពToolStripMenuItem.Click
        Dim frm As New empUnit
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub ឋននតរសកតToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ឋននតរសកតToolStripMenuItem.Click
        Dim frm As New empPosition
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub តនទToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles តនទToolStripMenuItem.Click
        Dim frm As New empRole
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub Menu_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If per <> 1 Then
            Me.MenuStrip1.Items(3).Visible = False
        End If
        Dim frm As New Message
        frm.lblmess.Text = "សូមស្វាគមន៍មកកាន់ប្រព័ន្ធគ្រប់គ្រងមន្រ្តីនគរបាល!!"
        frm.ShowDialog()
    End Sub

    Private Sub MainMenu_FormClosed(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles MyBase.FormClosed
        ' per = 2
    End Sub

    Private Sub បតរអនកបរបរសToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles បតរអនកបរបរសToolStripMenuItem.Click
        Dim frm As New Login
        frm.Show()
        Me.Close()

    End Sub

    Private Sub ចកចញToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ចកចញToolStripMenuItem.Click
        Me.Close()
    End Sub

    Private Sub អនកបរបរសToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles អនកបរបរសToolStripMenuItem.Click
        Dim frm As New ViewUser
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub បញជមនរតនគរបលToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim frm As New Report
        'frm.WindowState = FormWindowState.Maximized
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub កណតToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles កណតToolStripMenuItem1.Click
        Dim frm As New FormUserSetting
        frm.ShowDialog()
    End Sub

    Private Sub បរកបវតសToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles បរកបវតសToolStripMenuItem.Click
        'Dim frm As New ViewSalary
        'frm.Show()
        'frm.MdiParent = Me
        MessageBox.Show("មិនទាន់បានធ្វើនៅឡើយ")
    End Sub

    Private Sub មនរតតមអងគភពToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim frm As New UnitList
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub របយករនសងខបToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles របយករនសងខបToolStripMenuItem.Click
        Dim frm As New Report
        'frm.WindowState = FormWindowState.Maximized
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub របយករណតមអងគភពToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles របយករណតមអងគភពToolStripMenuItem.Click
        Dim frm As New UnitList
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub កនToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles កនToolStripMenuItem.Click
        Dim frm As New Children
        frm.Show()
        frm.MdiParent = Me
    End Sub
End Class